export function partition<T>(
  array: T[],
  assert: (value: T, index: number, array: T[]) => boolean,
): T[][] {
  const trueArray = array.filter(assert);
  const falseArray = array.filter(
    ((value, index, array1) => !assert(value, index, array1)),
  );
  return [trueArray, falseArray];
}
